package openbang.account.service.vo;

/**
 * 级别定义 : 普通、开发、核心
 * 
 * @author aibo zeng
 *
 */

public enum GradeEnum {
	NORMAL (0,"普通会员"),
	DEVELOPER(10,"开发会员"),
	CORE(20,"核心会员");

	private Integer code;
	private String desc;
	
	private GradeEnum(Integer code,String desc) {
		this.code = code;
		this.desc = desc;
	}
	public int getCode() {
		return code;
	}
	public String getDesc(){
		return desc;
	}
	
	public static String getDesc(Integer code) {
		for(GradeEnum each : GradeEnum.values()) {
			if(each.getCode()==code)
				return each.getDesc();
		}		
		return "";
	}
}
